<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    //构造函数
    function Person() {
        this.uname = "张三"
        console.log(this);
    }
    //  原型 方法:say
    Person.prototype.say = function () {
        console.log("我是张三");
    }

    //构造函数
    function Student() {
        Person.call(this)
    }

    //原型继承
    // let p1 = new Person()
    // Student.prototype = new Person()

    let s1 = new Student()
    console.log(s1.uname, 's1.uname');
    // s1.say()

</script>